package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.dao.PaymentDao;
import com.atguigu.springcloud.entities.Payment;
import com.atguigu.springcloud.service.PaymentSerivce;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.ServiceMode;
import java.util.logging.XMLFormatter;
@Service
public class PaymentServiceImpl implements PaymentSerivce {

    @Autowired
    private PaymentDao paymentDao;
    @Override
    public int creat(Payment payment) {
        int creat = paymentDao.creat(payment);
        return creat;
    }

    @Override
    public Payment getPaymentById(Long id) {
        Payment payment= paymentDao.getPaymentById(id);
        return payment;
    }
}
